//
//  MainNavigationController.m
//  美团外卖
//
//  Created by Alex on 16/9/23.
//  Copyright © 2016年 Alex. All rights reserved.
//

#import "MainNavigationController.h"

@interface MainNavigationController ()

@end

@implementation MainNavigationController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    
    UINavigationBar *navBar = [UINavigationBar appearance];
    
    [navBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];
    [navBar setShadowImage:[UIImage new]];
    
    
    //设置导航栏中：返回指示器的颜色、按钮文字的颜色、按钮上图片的颜色 (tintColor)
    self.navigationBar.tintColor = [UIColor blackColor];
    
    //设置导航栏中标题文字的效果 (字体,颜色以及阴影颜色)
    //titlTextAttributes 它是一个字典,它的key可以从 NSAttributedString.h 头文件里找到.
    self.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName : [UIColor whiteColor]};

}

#pragma mark
#pragma mark - 统一设置 状态栏样式
- (UIStatusBarStyle)preferredStatusBarStyle
{
    return  UIStatusBarStyleDefault;//黑色
}

#pragma mark
#pragma mark - 统一设置 子控制器push时,自动隐藏底部栏
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated{
    if (self.childViewControllers.count > 0) {
        viewController.hidesBottomBarWhenPushed = YES;
    }
    
    [super pushViewController:viewController animated:animated];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
